Optimal. Leaf size=43 \[ \frac{\cos (2 a) \text{CosIntegral}\left (2 b x^n\right )}{2 n}-\frac{\sin (2 a) \text{Si}\left (2 b x^n\right )}{2 n}+\frac{\log (x)}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0579186, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {3426, 3378, 3376, 3375} \[ \frac{\cos (2 a) \text{CosIntegral}\left (2 b x^n\right )}{2 n}-\frac{\sin (2 a) \text{Si}\left (2 b x^n\right )}{2 n}+\frac{\log (x)}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3426
Rule 3378
Rule 3376
Rule 3375
Rubi steps
\begin{align*} \int \frac{\cos ^2\left (a+b x^n\right )}{x} \, dx &=\int \left (\frac{1}{2 x}+\frac{\cos \left (2 a+2 b x^n\right )}{2 x}\right ) \, dx\\ &=\frac{\log (x)}{2}+\frac{1}{2} \int \frac{\cos \left (2 a+2 b x^n\right )}{x} \, dx\\ &=\frac{\log (x)}{2}+\frac{1}{2} \cos (2 a) \int \frac{\cos \left (2 b x^n\right )}{x} \, dx-\frac{1}{2} \sin (2 a) \int \frac{\sin \left (2 b x^n\right )}{x} \, dx\\ &=\frac{\cos (2 a) \text{Ci}\left (2 b x^n\right )}{2 n}+\frac{\log (x)}{2}-\frac{\sin (2 a) \text{Si}\left (2 b x^n\right )}{2 n}\\ \end{align*}
Mathematica [A] time = 0.0890335, size = 37, normalized size = 0.86 \[ \frac{\cos (2 a) \text{CosIntegral}\left (2 b x^n\right )-\sin (2 a) \text{Si}\left (2 b x^n\right )+n \log (x)}{2 n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.036, size = 45, normalized size = 1.1 \begin{align*} -{\frac{{\it Si} \left ( 2\,b{x}^{n} \right ) \sin \left ( 2\,a \right ) }{2\,n}}+{\frac{{\it Ci} \left ( 2\,b{x}^{n} \right ) \cos \left ( 2\,a \right ) }{2\,n}}+{\frac{\ln \left ( b{x}^{n} \right ) }{2\,n}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: IndexError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.86181, size = 165, normalized size = 3.84 \begin{align*} \frac{\cos \left (2 \, a\right ) \operatorname{Ci}\left (2 \, b x^{n}\right ) + \cos \left (2 \, a\right ) \operatorname{Ci}\left (-2 \, b x^{n}\right ) + 2 \, n \log \left (x\right ) - 2 \, \sin \left (2 \, a\right ) \operatorname{Si}\left (2 \, b x^{n}\right )}{4 \, n} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos ^{2}{\left (a + b x^{n} \right )}}{x}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cos \left (b x^{n} + a\right )^{2}}{x}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]